package com.jxmobi.car.core.model;

import com.jxmobi.base.util.AbstractPersistable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author fei <a href="mailto:xchen@jxmobi.com">Email the author</a>
 * @version 1.0 7/28/16
 */
@Entity
@Table(name = "t_car")
public class CarModel extends AbstractPersistable{
    private static final Logger log = LoggerFactory.getLogger(CarModel.class);

    /**
     *  brand of the car, such as JiangHui, BeiQi
     */
    @Column(name = "car_brand", length = 50)
    private String brand;

    /**
     *  model of the car, such as iev4, iev5
     */
    @Column(name = "model", length = 20, nullable = false, unique = true)
    private String model;

    /**
     *  card number of the car
     */
    @Column(name = "car_no", length = 50)
    private String cardNo;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    @Override
    public String toString() {
        return "CarModel{" +
                "brand='" + brand + '\'' +
                ", model='" + model + '\'' +
                ", cardNo='" + cardNo + '\'' +
                '}';
    }
}
